﻿@using StudMap.Core.Graph
@model List<StudMap.Core.Graph.Node>
@{
    Layout = null;
}

@if (Model.Any())
{
    <h3>Verbundene Knoten</h3>
    <div class="table ConnectedNodesTable">
    
        @foreach (Node node in Model)
        {
            <div id="node_@node.Id" class="tableCell">
                <div class="tableRow">
                    Knoten @(node.Id)
                </div>
                <div class="tableRow">
                    <img onclick=" deleteEdge(@ViewBag.StartNodeId, @node.Id); " class="DeleteBin" src="@Url.Content("~/Images/bin.png")" alt="Bin"/>
                </div>
            </div>
        }
    </div>
    <br />
}
<h3>Mit Knoten verbinden</h3>
<div class="table ConnectedNodesTable">
    <div id="node_new" class="tableCell">
        <div class="tableRow">
            <input id="inputNewEdge" value="" class="contextInputField" />
        </div>
        <div class="tableRow">
            <button id="addNewEdge" onclick=" addNewEdge(@ViewBag.StartNodeId) ">Verbinden</button>
        </div>
    </div>
</div>